﻿#ifndef EQUIPMENTLIST_H
#define EQUIPMENTLIST_H

#include <QtGui>
#include <QtSql>
#include "mydatamodel.h"


namespace Ui {
class equipmentList;
}

class equipmentList : public QFrame
{
    Q_OBJECT
    
public:
    explicit equipmentList(QWidget *parent = 0);
    ~equipmentList();
    
public slots:
    void updateList();
private:
    QString getQuery();
    void fillStuff();

    myDataModel *dbModel;
    bool showAll;



    Ui::equipmentList *ui;
    enum {
        EDB_enumber,
        EDB_indate,
        EDB_name,
        EDB_serial,
        EDB_problem,
        EDB_result,
        EDB_client,
        EDB_outdate,
        EDB_comment,
        EDB_who,
        EDB_attention
    };
private slots:

    void	currentRowChanged ( const QModelIndex & current, const QModelIndex & previous );


    void on_showallButton_clicked();
    void on_searchButton_clicked();
    void on_delSearchButton_clicked();
    void on_printButton_clicked();
    void on_doneButton_clicked();
    void on_addButton_clicked();
    void on_changeButton_clicked();
    void on_searchEdit_returnPressed();
    void on_exportButton_clicked();
};

#endif // EQUIPMENTLIST_H
